﻿@model TaoNiuOA.Models.Apply
@{
    ViewBag.Title = "申请明细";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<script type="text/javascript">
    function showStatus(obj) {
        switch (obj) {
            case 0:
                document.write("拒绝");
                break;
            case 1:
                document.write("同意");
                break;
            default:
                document.write("审批中");
                break;
        }
    }
</script>
<fieldset>
    <legend>申请明细</legend>
    <br />
    <table>
        <tr>
            <td>
                申请人
            </td>
            <td>
                @Html.DisplayFor(model => model.GetUser().GetUserInfo().Name)
            </td>
        </tr>
        <tr>
            <td>
                标题
            </td>
            <td>
                @Html.DisplayFor(model => model.Title)
            </td>
        </tr>
        <tr>
            <td>
                申请时间
            </td>
            <td>
                @Html.DisplayFor(model => model.ApplyTime)
            </td>
        </tr>
        <tr>
            <td>
                类型
            </td>
            <td>
                @Html.DisplayFor(model => model.GetApplyType().TypeName)
            </td>
        </tr>
        <tr>
            <td>
                内容
            </td>
            <td>
                @Html.DisplayFor(model => model.Content)
            </td>
        </tr>
        <tr>
            <td>
                开始时间
            </td>
            <td>
                @Html.DisplayFor(model => model.StartTime)
            </td>
        </tr>
        <tr>
            <td>
                结束时间
            </td>
            <td>
                @Html.DisplayFor(model => model.EndTime)
            </td>
        </tr>
        <tr>
            <td>
                状态
            </td>
            <td>
                <script>
            showStatus(@Model.Status);
                </script>
            </td>
        </tr>
        <tr>
            <td>
                审批人
            </td>
            <td>
                @Model.GetApprover().GetUserInfo().Name
            </td>
        </tr>
    </table>
</fieldset>
<p>
    @Html.ActionLink("编辑", "MyApplyEdit", new { id = Model.ApplyID })
</p>
